/*
 *   项目名称：train12306
 *   文件名称：com.xiaolon.train12306.common.exception.BusinessException
 *
 *   创建人：  ZHOU XIAO LONG
 *   创建日期：2024/11/8
 *
 */
package com.xiaolon.train12306.common.exception;

/*
 * 类描述：BusinessException
 */
public class BusinessException extends RuntimeException {
    private BusinessExceptionEnum e;

    @Override
    public String getMessage() {
        return e.getDesc();
    }

    public BusinessException(BusinessExceptionEnum e){
        this.e = e;
    }

    public void setE(BusinessExceptionEnum e) {
        this.e = e;
    }

    public BusinessExceptionEnum getE() {
        return e;
    }

    /**
     * 不写入堆栈信息，提高性能
     * @return
     */
    @Override
    public Throwable fillInStackTrace(){
        return this;
    }
}
